package cn.wolfcode.transfer.domain;

import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;

import java.math.BigDecimal;
import java.util.HashMap;

public class Salary {
    /** */
    private Long id;

    /** 工资金额*/
    private BigDecimal money;

    /** 年份*/
    private Integer year;

    /** 月份*/
    private Integer month;

    /** 员工*/
    private Employee employee;

    /** 发放方式*/
    private SystemDictionaryItem payout;

    public  String toJson(){
        HashMap<String,Object> map =new HashMap();
        System.out.println(employee);
        map.put("id",id);
        map.put("money",money);
        map.put("year", year);
        map.put("month",month);
        map.put("employee",employee.getId());
        map.put("payout",payout.getId());
        return JSON.toJSONString(map);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    public Integer getMonth() {
        return month;
    }

    public void setMonth(Integer month) {
        this.month = month;
    }

    public Employee getEmployee() {
        return employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }

    public SystemDictionaryItem getPayout() {
        return payout;
    }

    public void setPayout(SystemDictionaryItem payout) {
        this.payout = payout;
    }

}